import request from '@/utils/request'


export function exportExcelAPI(params) {
  return request({
    url: '/scores/exportExcel',
    method: 'GET',
    responseType: 'blob', 
    params
  });
}

export function exportExcel2API(params) {
  return request({
    url: '/scores/exportExcel2',
    method: 'GET',
    responseType: 'blob', 
    params
  });
}


export function getScoreAPI(params) {
  return request({
    url: '/scores/list',
    params
  })
}

export function scoresListTeacherAPI(params) {
  return request({
    url: '/scores/listTeacher',
    params
  })
}

export function submitScoreAPI(id){
  return request({
    url:`/scores/submitScore/${id}`,
    method: 'post'
  })
}

export function updateScoreAPI(scoreDto) {
  return request({
    url: '/scores/updateScore',
    method: "post",
    data: scoreDto
  })
}

export function passScoreAPI(id){
  return request({
    url:`/scores/passScore/${id}`,
    method: 'post'
  })
}

export function noPassScoreAPI(id){
  return request({
    url:`/scores/noPassScore/${id}`,
    method: 'post'
  })
}

export function deleteScoreAPI(scoreId){
  return request({
    url:`/scores/deleteScore/${scoreId}`,
    method: 'delete'
  })
}


